package com.yc.springmvc.service.impl;

import com.yc.springmvc.bean.Person;
import com.yc.springmvc.dao.PersonDao;
import com.yc.springmvc.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class PersonServiceImpl implements PersonService {

    @Resource
    private PersonDao personDao;

    @Override
    public boolean save(Person person) {
        personDao.save(person);
        return true;
    }

    @Override
    public boolean update(Person person) {
        return false;
    }

    @Override
    public boolean delete(String name) {
        return false;
    }

    @Override
    public Person getByName(String name) {
        return personDao.getByName(name);
    }

    @Override
    public List<Person> getAll() {
        return null;
    }
}
